projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ff4fdb
)
switch: propagate the active state to the slider
author
Cosimo Cecchi
<cosimoc@gnome.org>
Mon, 28 Feb 2011 23:46:46 +0000
(18:46 -0500)
committer
Cosimo Cecchi
<cosimoc@gnome.org>
Thu, 3 Mar 2011 22:48:25 +0000
(17:48 -0500)
gtk/gtkswitch.c
patch
|
blob
|
history
diff --git
a/gtk/gtkswitch.c
b/gtk/gtkswitch.c
index d69534c1ed69175ed44bb3be1e3c4514538a076c..1a8e42762d6b68b2a4c03d97c90c33432cc926a6 100644
(file)
--- a/
gtk/gtkswitch.c
+++ b/
gtk/gtkswitch.c
@@
-473,11
+473,15
@@
gtk_switch_paint_handle (GtkWidget *widget,
cairo_t *cr,
GdkRectangle *box)
{
+ GtkSwitchPrivate *priv = GTK_SWITCH (widget)->priv;
GtkStyleContext *context = gtk_widget_get_style_context (widget);
GtkStateFlags state;
state = gtk_widget_get_state_flags (widget);
+ if (priv->is_active)
+ state |= GTK_STATE_FLAG_ACTIVE;
+
gtk_style_context_save (context);
gtk_style_context_set_state (context, state);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SLIDER);